import request from '@/utils/request';

const URL = '/virtualParam';
// 测试接口
const API = {
    // 查询所有虚拟参数
    queryVirtualList (queryParams?: any) {
        return request<any> ({
            url: `${URL}/queryList`,
            method: 'GET',
            params: queryParams,
        })
    },
    // 新增虚拟参数
    addVirtualParam (params?: any) {
        return request<any> ({
            url: `${URL}/addVirtualParam`,
            method: 'POST',
            data: params,
        })
    },
    // 更新虚拟参数
    updateVirtualParam (params?: any) {
        return request<any> ({
            url: `${URL}/updateVirtualParam`,
            method: 'POST',
            data: params,
        })
    },
    // 删除虚拟参数
    removeVirtualParam(id?:any) {
        return request<any> ({
            url: `${URL}/removeVirtualParam?id=${id}`,
            method: 'GET',
        })
    },
    getDataReplay (queryParams?: any) {
        return request<any> ({
            url: `/dataReplay/queryParams`,
            method: 'GET',
            params: queryParams,
        })
    },
    getParamsWithOnline (queryParams?: any) {
        return request<any> ({
            url: `/dataReplay/queryParamsWithOnline`,
            method: 'GET',
            params: queryParams,
        })
    }
}

export default API;
